<!--
 * @页面名称:首页新闻管理
 * @描述: 
 * @作者: 
 * @Date:
-->
<template>
  <div class="modules newManage">
    <a-card>
      <template #title>
        <span>{{ itemConfig.MS_ModuleName }}</span>
        <router-link :to="{ path: itemConfig.MS_View }">
          <el-link type="primary">更多</el-link>
        </router-link>
      </template>
      <el-table :data="tableData" height="250" style="width: 100%">
        <el-table-column prop="MDI_Type" label="类型" width="90" />
        <el-table-column prop="MDI_Create_Time" label="创建时间" width="180" />
        <!-- <el-table-column prop="MDI_Url" label="链接" width="240" /> -->
        <el-table-column prop="MDI_Title" label="标题" />
        <el-table-column prop="MDI_Content" label="内容" />
      </el-table>
    </a-card>
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from "vue";
import useCurrentInstance from "@/utils/useCurrentInstance";

const { proxy } = useCurrentInstance();
const props = defineProps({
  itemConfig: {
    type: Object,
    default: () => {}
  }
});
const tableData = ref([]);
// 获取数据
const getTableData = () => {
  proxy.$vueAxios
    .get("/Master_Base_MsgDocInfo/Get", {
      order: "MDI_Order asc",
      pageIndex: 1,
      pageSize: 15
    })
    .then((res: any) => {
      tableData.value = res.List;
    });
};
onMounted(() => {
  getTableData();
});
</script>

<style scoped lang="scss">
.newManage {
  height: calc(100% - 10px) !important;
}
</style>
